<template>

<h2>登陆页面</h2>

    <table class="table table-bordered">
                <thead>

                    <tr>
                    <th>用户手机号</th>
                    <th>
                        <input type="text" v-model="Phone">
                    </th>
                </tr>


                <tr>
                    <th>用户密码</th>
                    <th>
                        <input type="text" v-model="pwd">
                    </th>
                </tr>


                <tr>
                    <th>用户姓名</th>
                    <th>
                       <button @click="Login" class="btn btn-success">登陆</button>
                    </th>
                </tr>


                </thead>
    </table>



</template>


<script setup lang="ts">

import axios from 'axios'

import{ref}from 'vue';




const Phone = ref('')

const pwd = ref('')


const Login=()=>{

  
axios.get('https://localhost:7035/api/Member/MemberLogin',{params:{
    phone:Phone.value,
    pwd:pwd.value,


}}).then(res=>{

        if(res.data.Dto_Code>0)
        {
            alert('登陆成功')
        }
        else if(res.data.Dto_Code==-1)
        {
            alert('账号密码不匹配')
        }

        else if(res.data.Dto_Code==-2)
        {
            alert('手机号不存在')
        }
})


}





</script>